#ifndef SPRINGS_DIALOG_H
#define SPRINGS_DIALOG_H

#include <QDialog>
#include <QtGui>

#include "defines/global.h"

class SpringsDialog : public QDialog{
    Q_OBJECT

    public:
        SpringsDialog(TreeItem *, QWidget * = 0);
        ~SpringsDialog();

    signals:
        void done();

    private:
        TreeItem *item;

        int colorRStructural, colorGStructural, colorBStructural, colorAlphaStructural;
        int colorRShear, colorGShear, colorBShear, colorAlphaShear;
        int colorRFlexion, colorGFlexion, colorBFlexion, colorAlphaFlexion;
		double ksStructural, kdStructural;
		double ksShear, kdShear;
		double ksFlexion, kdFlexion;

		QPushButton *colorStructuralPushButton;
		QPushButton *colorShearPushButton;
		QPushButton *colorFlexionPushButton;
        QGroupBox *colorStructuralGroupBox;
        QGroupBox *colorShearGroupBox;
        QGroupBox *colorFlexionGroupBox;
        QGroupBox *kStructuralGroupBox;
        QGroupBox *kShearGroupBox;
        QGroupBox *kFlexionGroupBox;

        void createLayout();

        void setButtonColor(QPushButton *, double, double, double, double);

    private slots:
        void acceptChange();
        void changeColorStructural();
        void changeColorShear();
        void changeColorFlexion();
        void changeKsStructural(double);
        void changeKdStructural(double);
        void changeKsShear(double);
        void changeKdShear(double);
        void changeKsFlexion(double);
        void changeKdFlexion(double);
};

#endif


